package cloud.shyidong.system.request;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Description TODO
 * @Author syd
 * @Date 2023/4/17
 */
@Data
public class InfoUpdateRequest {
    
    @NotBlank(message = "缺少名称")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,16}", message = "名称必须为2到16位中文")
    private String name;
    
    @NotBlank(message = "缺少电话号码")
    @Pattern(regexp = "^\\d{7,12}$", message = "电话号码格式有误")
    private String phone;
    
    @NotBlank(message = "缺少邮箱")
    @Pattern(regexp = "^([a-zA-Z0-9]+[_|\\_|\\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\\_|\\.]?)*[a-zA-Z0-9]+\\.[a-zA-Z]{2,3}$", message = "邮箱格式有误")
    @Size(min = 8, max = 32, message = "邮箱的长度为{min}到{max}位字符")
    private String email;
    
    private String remark;
    
}
